{% extends "base.html" %}

{% load static %}

{% block title %}注册新用户{% endblock %}

{% block content %}
<div class="row text-center vertical-middle-sm">
    <h1>注册</h1>
    <p>如果你已经是用户的话, <strong><a href="{% url 'account:user_login' %}">请登陆</a></strong></p>
    <p>否则, 进行注册</p>

    <form action="."  method="post" class="form-horizontal">
        {% csrf_token %}
        <div class="form-group">
            <label for="{{ form.username.id_for_label }}" class="col-md-5 control-label">用户名</label>
            <div class="col-md-6 text-left">{{ form.username }}</div>
        </div>
        <div class="form-group">
            <label for="{{ form.email.id_for_label }}" class="col-md-5 control-label">邮箱</label>
            <div class="col-md-6 text-left">{{ form.email }}</div>
        </div>
        <div class="form-group">
            <label for="{{ profile.birth.id_for_label }}" class="col-md-5 control-label">出生日前(选填)</label>
            <div class="col-md-6 text-left">{{ profile.birth }}</div>
        </div>
        <div class="form-group">
            <label for="{{ profile.phone.id_for_label }}" class="col-md-5 control-label">手机号码(选填)</label>
            <div class="col-md-6 text-left">{{ profile.phone }}</div>
        </div>
        <div class="form-group">
            <label for="{{ form.password.id_for_label }}" class="col-md-5 control-label">密码</label>
            <div class="col-md-6 text-left">{{ form.password }}</div>
        </div>
        <div class="form-group">
            <label for="{{ form.password2.id_for_label }}" class="col-md-5 control-label">确认密码</label>
            <div class="col-md-6 text-left">{{ form.password2 }}</div>
        </div>

        <input type="submit" value="注册" class="btn btn-primary btn-lg">
    </form>
</div>

{% endblock %}